{include file="public/header" /}
<style>
    .layui-form-select dl dd.layui-this {
        color: #1CC87A !important;
    }

    .layui-form-select dl dd {
        text-align: center;
    }

    .layui-form-select .layui-input {
        border: none;
        padding-left: 0 !important;
        text-align: right;
        width: 100%;

    }
    .set-list li {
        background-color: var(--cl);
        padding: 0 0.9375rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 3.125rem;
        margin-bottom: 0.625rem;
    }
    .set-list li input{
        text-align: right;
    }
</style>
<body>
<div class="header">
    <i class="layui-icon layui-icon-left"></i> 绑定{$title}
</div>
<form action="{:url('user/method_save',['type'=>$type])}" method="post" class="form layui-form">
    <ul class="set-list">
        {if $type != 'bank'}
        <li>
            <p>真实姓名</p>
            <input type="text" name="name" value="<?php echo $user[$type . '_name']?>" placeholder="请填写真实姓名" style="text-align: right">
        </li>
        <li class="upd-label" style="height: auto;">
            <p>收款码</p>

            <p class="flex-center" style="margin: 10px;width: 70%;justify-content: right">
                <img id="image_show" src="<?php echo $user[$type . '_image']??'/static/index/img/addImg.png';?>" alt="" >
                <img src="/static/index/img/addImg.png" alt="" id="uploads_image" style="margin-left: 5px">

            </p>
            <input type="hidden" name="image" id="images_value" value="<?php echo $user[$type . '_image'];?>"/>
        </li>
        {else}
        <li>
            <p>银行名称</p>
            <select name="bank_name" lay-verify="required" lay-reqtext="请选择银行" lay-verType="tips">
                <option value="">请选择</option>
                {foreach name="bank_list" item="vo" }
                <option value="{$vo}" {if $user.bank_name== $vo}selected{/if} >{$vo}</option>
                {/foreach}
            </select>
        </li>
        <li>
            <p>开户行</p>
            <input type="text" name="bank_open" value="{$user.bank_open?:''}" lay-verify="required"
                   lay-reqtext="请填写开户行" lay-verType="tips" placeholder="请填写开户行">
        </li>
        <li>
            <p>持卡人</p>
            <input type="text" name="bank_account_name" value="{$user.bank_account_name?:''}" lay-verify="required"
                   lay-reqtext="请填写银行户名" lay-verType="tips" placeholder="请填写银行户名">
        </li>
        <li>
            <p>银行卡号</p>
            <input type="text" name="bank_number"  value="{$user.bank_number?:''}" lay-verify="required"
                   lay-reqtext="请填写银行账号" lay-verType="tips" placeholder="请填写银行账号">
        </li>
        {/if}
    </ul>

    <p class="save save-fixed upd-save" lay-submit lay-filter="save" formObj=".form">保存</p>
</form>
</body>
{include file="public/footer"/}
</html>